<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>页面头部</title>
<style type="text/css">
@import url("../css/common.css");
</style>
<script language="javascript">
function checkEmail()
{
	var frm = window.document.frm;
	if(frm.email.value=='')	
	{
		alert("请输入Email地址！");
		return ;
	}
	if(frm.email.value.length >0)  {  
    	var email = frm.email.value;
    	var pattern = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
		flag = pattern.test(email);
		if(!flag){
        	alert("对不起，邮件格式不正确!");
        	frm.email.focus();
        	return ;
      }
    }	
	if(window.confirm("确定订阅下一期团课信息吗?"))
	{
		frm.submit();
		alert("订阅已成功！我们会定期将后续的团课信息发送至您的邮箱，请注意查收！");
	} 
}

function qk()
{
	document.frm.email.value = '';
}
</script>
</head>

<body>

<div class="all" id="alltop">
  <div id="MenuTop">
    <div class="allmenu" id="TopLogo"></div>
    <div class="allmenu" id="TopMail">
	  <form id="frm" name="frm" method="post" action="addSubscribeUser.do">
      <div class="alltop" id="InputMail">        
          <input name="email" type="text" id="email"  
            style="height:26px; width:140px; border:none; background:none; padding:5px; padding-left:10px; vertical-align:middle; font-size:13px" value="输入Email订阅下期团课" onFocus="qk();"/>        
      </div>
      <div class="alltop" id="TopMailButton">
          <input type="button" name="TopMail" id="TopMail2" value="订 阅"  onClick="checkEmail();"
            style="background:none; border:none; width:45px; height:26px; font:宋体; font-size:12px; color:#FFF"/>      
      </div>
	  </form>
    </div>
  </div>
</div>
<div class="all" id="allmenu">
  <div id="nav">
    <ul>
      <li><a href="welcome.jsp" target="_top" title="今日团购" >今日团购</a></li>
      <li><a href="old.jsp" target="_top"  title="往期团购">往期团购</a></li>
      <li><a href="message.jsp" target="_top"  title="合作伙伴">合作伙伴</a></li>
      <li><a href="lxfs.jsp" target="_top"  title="联系方式">联系方式</a></li>
    </ul>
  </div>
</div>
</body>
</html>
